'''
	Andrew Oberlin
	Date Created: February 27, 2012
	Date Last Modified: February 27, 2012
'''
class VisualObject2D:
	'''
		A general object that represents something
		in the 3D world--all objects are planes that
		pretend to be 3D
	'''
	def __init__(self, parent, pathToTexture, scale):
		self.parent = parent
		self.loadModel(pathToTexture, scale)
		
	'''
		Loads the correct model for the visual object
	'''
	def loadModel(self, pathToTexture, scale):
		self.model = self.parent.loader.loadModelCopy("models/plane")
		self.texture = self.parent.loader.loadTexture(pathToTexture)
		self.model.setTexture(self.texture);
		self.model.setScale(scale)
		self.model.reparentTo(self.parent.base.aspect2d)
	
	'''
		Wrapper for the model's position method
	'''
	def setPos(self, pos):
		self.model.setPos(pos)
		
	'''
		Wrapper for the model's position method
	'''
	def setX(self, x):
		self.model.setX(x)
		
	'''
		Wrapper for the model's position method
	'''
	def setY(self, y):
		self.model.setY(y)
		
		
	'''
		Wrapper for the model's position method
	'''
	def getPos(self):
		return self.model.getPos()
		
	'''
		Wrapper for the model's position method
	'''
	def getX(self):
		return self.model.getX()
		
	'''
		Wrapper for the model's position method
	'''
	def getY(self):
		return self.model.getY()
		